package cn.bdqn.mallmgr.tools;

import com.alibaba.fastjson.JSONObject;
import org.springframework.util.DigestUtils;

/**
 * @author
 * @create 2022-07-12 9:10
 */
public class TokenTool {
    /**
     * 生产token值
     *
     * @param obj object
     * @return java.lang.String
     */
    public static String createToken(Object obj) {
        return DigestUtils.md5DigestAsHex(JSONObject.toJSONBytes(obj));
    }
}
